package com.factory._04single;

/**
 *
 * 饿汉式单例
 * @author Qinye
 * @date 2023/8/11 21:48
 */
public class EagerSingleton {
    private static final EagerSingleton eagerSingleton = new EagerSingleton();
    private EagerSingleton(){}

    public  synchronized  static EagerSingleton getInstance(){
        return eagerSingleton;
    }
}
